<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% 
	String path = request.getContextPath();
	request.getSession().removeAttribute("user");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>login</title>
<script type="text/javascript">

function validateForm() {
	var username = document.getElementById("username"); 
	var password = document.getElementById("password"); 
	
	if (username.value == "") {
		alert("username is null.");
		return;
	} else if (password.value == "") {
		alert("password is null.");
		return;
	} 

	document.frm.submit();
}

</script>

</head>
<body>
<form id="frm" name="frm" action="<%=path %>/purchase/login.do" method="post">
	<table align="center">
		<tr align="center">
			<td colspan="2">Login</td>
		</tr>
		<tr>
			<td>username:</td>
			<td>
				<input type="text" id="username" name="username" />
			</td>
		</tr>
		<tr>
			<td>password:</td>
			<td><input type="password" id="password" name="password" value="1" /></td>
		</tr>
		<tr>
			<td colspan="2">User：user1、user2、manager1、manager2</td>
		</tr>
		<tr align="center">
			<td colspan="2">
				<input type="button" value="login" onclick="validateForm();" /> 
			</td>
		</tr>
	</table>
</form>
</body>
</html>